import datetime
from dataclasses import dataclass

from src.core.models.enums import UserCalendarStatus


@dataclass(frozen=True)
class CalendarTaskDTO:
    id: int
    day: int
    task_text_ru: str
    task_text_en: str
    task_text_uk: str
    media_filename: str | None = None


@dataclass(frozen=True)
class CheckMessageDTO:
    id: int
    text_ru: str
    text_en: str
    text_uk: str
    media_filename: str | None = None


@dataclass(frozen=True)
class CalendarDTO:
    id: int
    title_ru: str
    title_en: str
    title_uk: str
    category_id: int
    description_ru: str
    description_en: str
    description_uk: str
    final_message_ru: str
    final_message_en: str
    final_message_uk: str


@dataclass(frozen=True)
class UserCalendarDTO(CalendarDTO):
    user_id: int
    status: UserCalendarStatus
    calendar_id: int
    subscription_id: int
    successful_tasks: int
    tasks_sent: int
    get_tasks_time: datetime.time
    check_tasks_time: datetime.time


@dataclass(frozen=True)
class CalendarWithTasksAndMessagesDTO(CalendarDTO):
    tasks: list[CalendarTaskDTO]
    check_messages: list[CheckMessageDTO]
